xend: Fix removing /vm/UUID/device paths when device cannot be disconnected
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 12 Mar 2009 15:08:08 +0000 (15:08 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 12 Mar 2009 15:08:08 +0000 (15:08 +0000)
commit0aef8a0311fab6deb58b8d528810711666914f0e
tree2fbc6a5df622dffa07c23143e14a555aed73743c
parent677a041f1f521c43ecaba52d1d663785d22d57b7
xend: Fix removing /vm/UUID/device paths when device cannot be disconnected

This is a corrected version of a patch commited as c/s 19250 and
reverted by c/s 19314. Thanks to "trap sigerr ERR" in
xen-hotplug-common.sh the xen-hotplug-cleanup would exit when reading
/local/domain/ID/vm fails thus skipping all the xenstore-rm lines in
the rest of the script.

Change deviceDestroy behavior to remove /vm/UUID/device/...
path only when force was used (as it already does so for both frontend
and backend) and do the removing from xen-hotplug-cleanup script when
we are sure the device is really not attached to the guest any more.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
tools/hotplug/Linux/xen-hotplug-cleanup
tools/python/xen/xend/server/DevController.py